<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var str = prompt('请输入您要查询的水果');
        switch (str) {
            case '火龙果':
                alert('5元/斤');
                break;
            case '苹果':
                alert('6元/斤');
                break;
            case '香蕉':
                alert('4元/斤');
                break;
            case '葡萄':
                alert('7元/斤');
                break;
            case '脐橙':
                alert('2元/斤');
                break;
            default:
                alert('已售完');
        }
    </script>
</head>
<body>
    
</body>
</html>